package com.taokatao.cardmee.db.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.OrderBy;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.ToMany;

import java.util.List;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.Transient;

import com.taokatao.cardmee.db.DaoSession;
import com.taokatao.cardmee.db.CardGradeDao;
import com.taokatao.cardmee.db.CardStoreDao;

/**
 * Created by LY on 2016/9/12.
 */

@Entity
public class CardStore extends DBModel {
    /**
     * 商家id
     */
    @Id private Long businessId;
    /**
     * 商家名称
     */
    @Property(nameInDb = "BUSINESS_NAME") private String businessName;
    /**
     * 商家logo地址
     */
    @Property(nameInDb = "BUSINESS_ICON") private String businessIcon;
    /**
     * 拼音首字母
     */
    @Property(nameInDb = "SORT") private String sort;
    /**
     * 备注
     */
    @Property(nameInDb = "BUSINESS_REMARK") private String businessRemark;
    /**
     * 是否为热门,0:否,1:是
     */
    @Property(nameInDb = "IF_HOT") private Integer ifHot;
    public static final int STATUS_HOT = 1;
    /**
     * 商家码类型
     */
    @Property(nameInDb = "BARCODE_FORMAT") private String barcodeFormat;
    /**
     * 商家码是否有码
     */
    @Property(nameInDb = "BARCODE_STATUS") private String barcodeStatus;
    // 没有码
    public static final String BARCODE_STATUS_NONE = "0";
    /**
     * 搜索关键字
     */
    @Property(nameInDb = "SEARCH_KEYS") private String searchKeys;

    @Property(nameInDb = "PRIMARY_COLOR") private String backColor;

    @Property(nameInDb = "REGION_ID") private Integer regionId;
    // 中国的显示
    public static final int REGION_CHINA = 1;

    @Property(nameInDb = "USE_COUNT") private Integer useCount;

    @Transient private List<CardGrade> cardsGradeList;

    public List<CardGrade> getCardsGradeList() {
        return cardsGradeList;
    }

    public void setCardsGradeList(List<CardGrade> cardsGradeList) {
        this.cardsGradeList = cardsGradeList;
    }

    @Generated(hash = 1086958817)
    public CardStore(Long businessId, String businessName, String businessIcon,
            String sort, String businessRemark, Integer ifHot,
            String barcodeFormat, String barcodeStatus, String searchKeys,
            String backColor, Integer regionId, Integer useCount) {
        this.businessId = businessId;
        this.businessName = businessName;
        this.businessIcon = businessIcon;
        this.sort = sort;
        this.businessRemark = businessRemark;
        this.ifHot = ifHot;
        this.barcodeFormat = barcodeFormat;
        this.barcodeStatus = barcodeStatus;
        this.searchKeys = searchKeys;
        this.backColor = backColor;
        this.regionId = regionId;
        this.useCount = useCount;
    }

    @Generated(hash = 1072495425)
    public CardStore() {
    }

    @Override
    public String toString() {
        return "CardStore{" +
                "businessId=" + businessId +
                ", businessName='" + businessName + '\'' +
                ", businessIcon='" + businessIcon + '\'' +
                ", sort='" + sort + '\'' +
                ", businessRemark='" + businessRemark + '\'' +
                ", ifHot=" + ifHot +
                ", barcodeFormat='" + barcodeFormat + '\'' +
                ", barcodeStatus='" + barcodeStatus + '\'' +
                ", searchKeys='" + searchKeys + '\'' +
                ", backColor='" + backColor + '\'' +
                ", regionId=" + regionId +
                ", useCount=" + useCount +
                '}';
    }

    public Long getBusinessId() {
        return this.businessId;
    }

    public void setBusinessId(Long businessId) {
        this.businessId = businessId;
    }

    public String getBusinessName() {
        return this.businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public String getBusinessIcon() {
        return this.businessIcon;
    }

    public void setBusinessIcon(String businessIcon) {
        this.businessIcon = businessIcon;
    }

    public String getSort() {
        return this.sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getBusinessRemark() {
        return this.businessRemark;
    }

    public void setBusinessRemark(String businessRemark) {
        this.businessRemark = businessRemark;
    }

    public Integer getIfHot() {
        return this.ifHot;
    }

    public void setIfHot(Integer ifHot) {
        this.ifHot = ifHot;
    }

    public String getBarcodeFormat() {
        return this.barcodeFormat;
    }

    public void setBarcodeFormat(String barcodeFormat) {
        this.barcodeFormat = barcodeFormat;
    }

    public String getBarcodeStatus() {
        return this.barcodeStatus;
    }

    public void setBarcodeStatus(String barcodeStatus) {
        this.barcodeStatus = barcodeStatus;
    }

    public String getSearchKeys() {
        return this.searchKeys;
    }

    public void setSearchKeys(String searchKeys) {
        this.searchKeys = searchKeys;
    }

    public String getBackColor() {
        return this.backColor;
    }

    public void setBackColor(String backColor) {
        this.backColor = backColor;
    }

    public Integer getRegionId() {
        return this.regionId;
    }

    public void setRegionId(Integer regionId) {
        this.regionId = regionId;
    }

    public Integer getUseCount() {
        return this.useCount;
    }

    public void setUseCount(Integer useCount) {
        this.useCount = useCount;
    }

}
